{% load static %}
<!DOCTYPE html>
<html lang="en">

<head>
    <title>My Articles</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="{% static 'css/button.css' %}">
    <link rel="stylesheet" type="text/css" href="{% static 'css/footer.css' %}">
    <script src="https://cdn.staticfile.org/jquery/3.2.1/jquery.min.js"></script>
    <script src="https://cdn.staticfile.org/popper.js/1.15.0/umd/popper.min.js"></script>
    <script src="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/js/bootstrap.min.js"></script>
    <script src="{% static 'js/button.js' %}"></script>
    <!-- 引入monikai.css -->
    <link rel="stylesheet" href="{% static 'md_css/monokai.css' %}">

</head>

<!-- 导航栏 -->
<div class="container" style="margin-top:15px">


    <nav class="navbar navbar-expand-sm bg-secondary navbar-light">
        <a class="navbar-brand" href="{% url 'article:index' %}">IBLOG</a>
        <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
                aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
        </button>

        <ul class="navbar-nav">
            <li class="nav-item active">
                <a class="nav-link" href="{% url 'article:my_articles' %}">我的博客</a>
            </li>
        </ul>
        <!-- 这个 div 加上 justify-content-end 样式即可 -->
        <div class="collapse navbar-collapse justify-content-end" id="navbarSupportedContent">
            <ul class="navbar-nav" id="headerNav">
                <li class="nav-item" id="navMainPage"><a class="nav-link" href="{% url 'article:add_article' %}">
                    Add </a></li>
                <li class="nav-item" id="navMainPage"><a class="nav-link" href="#"></a></li>
                <li class="nav-item" id="navMainPage"><a class="nav-link" href="#"></a></li>

            </ul>
        </div>
    </nav>
</div>

<br>
<div class="container">
    <div class="row">
        {% for my_article in my_articles %}
            <div class="col-sm-4 mt-3">
                <div class="card card-primary">
                    <div class="card bg-light text-dark">
                        <div class="card hearder">
                            <h3>{{ my_article.art_title }}</h3>
                        </div>
                    </div>
                    <div class="card-body">
                        <p>{{ my_article.art_body |slice:'40'|safe }}</p>
                    </div>

                    <div class="card-footer">
                        {{ my_article.created_time }}
                        <a href="{% url 'article:article_detail' my_article.id %}" class="btn btn-info"
                           role="button">阅读</a>
                    </div>
                </div>
            </div>
        {% endfor %}


    </div>

</div>


<!-- 向上按钮 -->
<button type="button" id="BackTop" class="toTop-arrow" style="z-index: 100;"></button>

<!-- 新增两个 div 容器 -->
<div id="wrapper">
    <div id="push"></div>
</div>


<div class="container text-center">
    <!-- 分页 -->
    <ul class="nav justify-content-center">
        <ul class="pagination ">

            <li class="page-item">
                <a class="page-link" href="#" aria-label="Previous">
                    <span aria-hidden="true">&laquo;</span>
                </a>
            </li>
            <li class="page-item active"><a class="page-link" href="#">1</a></li>
            <li class="page-item"><a class="page-link" href="#">...</a></li>
            <li class="page-item"><a class="page-link" href="#">3</a></li>
            <li class="page-item"><a class="page-link" href="#">...</a></li>
            <li class="page-item"><a class="page-link" href="#">100</a></li>
            <li class="page-item">
                <a class="page-link" href="#" aria-label="Next">
                    <span aria-hidden="true">&raquo;</span>
                </a>
            </li>
        </ul>
    </ul>
    <p>Page</p>
</div>


<!-- 页脚 -->

<footer id="footer">
    <div class="container">
        <hr style="margin: 0;">
    </div>
    <nav class="navbar navbar-light mb-0" id="nav-footer" style="background-color: white">

        <div class="row col-12 justify-content-center font-size-xs">
            <div style="text-align: center; color: black;">
                <div class="mb-0">
                    <div id="show_time0">
                        <script>
                            setInterval("show_time0.innerHTML='CopyRight © 2019 ~'+new Date().getFullYear();", 1000);
                        </script>
                    </div>
                    ZXY iblog
                </div>
                <p class="mb-0">Powered by
                    <span class="mb-0">&nbsp;<a href="https://beian.miit.gov.cn/">豫ICP备20007445号</a></span>
                </p>
            </div>
        </div>
        </div>
    </nav>
</footer>

</body>

</html>

</body>

</html>